package com.atguigu;

/**
 * 同事抽象类
 *
 * @author melo
 */
public abstract class Colleague {

    private final Mediator mediator;

    public String name;

    public Colleague(Mediator mediator, String name) {
        this.mediator = mediator;
        this.name = name;
    }

    public Mediator getMediator() {
        return this.mediator;
    }

    /**
     * 发送消息 抽象方法
     * @param stateChange 改变的状态
     */
    public abstract void sendMessage(int stateChange);
}
